#include <string.h>
#include "functions.h"

int check_args(int argc, char **argv) {
	if(argc == 1)
		return 0;
	if((argc == 5) && (strcmp(argv[3], "-o") == 0))
		return 1;
	else
		return -1;
}

int last_non_empty(int *tape, int tape_lgt) {

	int i;
	int last = -1;

	for(i = 0; i < tape_lgt; i++)
		if(tape[i] == 1 || tape[i] == 0)
			last = i;	

	return last;

}
